package com.yanqu.road.server.manager.activity.commonteam.activitytypehandler;

import com.yanqu.road.entity.activity.commonteam.data.CommonTeamUserData;
import com.yanqu.road.exception.BusinessException;
import com.yanqu.road.pb.activity.CommonTeamProto;
import com.yanqu.road.utils.FixSizeLinkedList;

import java.util.List;

public interface CommonTeamActivityTypeStrategy {

    /**
     * 获取玩家活动积分
     * @param activityId
     * @param groupId
     * @param userId
     * @return
     */
    List<Long> getUserActivityScoreList(int activityId, int groupId, long userId);

    /**
     * 获取队伍榜单类型
     * @return
     */
    List<Integer> getTeamRankConditionTypes();

    /**
     * 格式化聊天数据
     * @param activityId
     * @param groupId
     * @param chatMsgList
     * @return
     */
    FixSizeLinkedList<CommonTeamProto.CommonTeamChatMsg> formatTeamChatMsgList(int activityId, int groupId, FixSizeLinkedList<CommonTeamProto.CommonTeamChatMsg> chatMsgList);

    /**
     * 同意入队后处理
     * @param activityId
     * @param groupId
     * @param teamId
     * @param userData
     * @throws BusinessException
     */
     void agreeJoinTeamAfterHandle(int activityId, int groupId, int teamId, CommonTeamUserData userData, String language) throws BusinessException;

    /**
     * 退出队伍处理
     * @param activityId 活动id
     * @param groupId 分组id
     * @param teamId 队伍id
     * @param userId 玩家id
     * @throws BusinessException
     */
    default void quitTeamAfterHandle(int activityId, int groupId, int teamId, long userId) throws BusinessException {

    }

    /**
     * 创建队伍处理
     * @param activityId 活动id
     * @param groupId 分组id
     * @param teamId 队伍id
     * @param userId 玩家id
     * @throws BusinessException
     */
    default void createTeamAfterHandle(int activityId, int groupId, int teamId, long userId) throws BusinessException {

    }
}
